// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import '../static/js/rem.js'
import {Alert, Confirm} from 'wc-messagebox'
import { MessageBox } from 'mint-ui'
import 'wc-messagebox/style.css'
import './style/my-mint-ui.scss'



Vue.use(MintUI);
Vue.use(Alert);
Vue.use(Confirm);
Vue.config.productionTip = false;



// let fundebug= require('fundebug-javascript');
// fundebug.apikey = '4c6305a907db94ac135f5adad906aad54097d21f0322495202692db17c6ed50c';
function formatComponentName(vm)
{
    if (vm.$root === vm) return 'root';
    let name = vm._isVue ? (vm.$options && vm.$options.name) || (vm.$options && vm.$options._componentTag) : vm.name;
    return (name ? 'component <' + name + '>' : 'anonymous component') + (vm._isVue && vm.$options && vm.$options.__file ? ' at ' + (vm.$options && vm.$options.__file) : '');
}
Vue.config.errorHandler = function(err, vm, info)
{
    let componentName = formatComponentName(vm);
    let propsData = vm.$options && vm.$options.propsData;
    // if(fundebugAllow) {
    //     fundebug.notifyError(err,
    //         {
    //             metaData:
    //                 {
    //                     componentName: componentName,
    //                     propsData: propsData,
    //                     info: info
    //                 }
    //         });
    // }
};


/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    template: '<App/>',
    components: { App }
});

//百度地图
import BaiduMap from 'vue-baidu-map'
Vue.use(BaiduMap, {
    ak: 'qnG9Q2oSgfGlwLUBeYBp7gTvFUCk31me',
});
